package com.zzyl.nursing.mapper;

import java.util.List;

import com.zzyl.nursing.domain.FamilyMemberElder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.zzyl.nursing.vo.FamilyElderListVo;
import com.zzyl.nursing.vo.FamilyElderVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 客户老人关联Mapper接口
 *
 * @author ruoyi
 * @date 2024-11-25
 */
@Mapper
public interface FamilyMemberElderMapper extends BaseMapper<FamilyMemberElder> {

    @Select("select f.id,f.family_member_id, e.id elderId,e.name elderName from family_member_elder f left join elder e on f.elder_id = e.id where f.family_member_id=#{userId}")
    List<FamilyElderVo> selectMy(long userId);


    List<FamilyElderListVo> FamilyMemberElderList(Long userId);
}